A Scheme-to-Java Translator with Soft Typing
نویسندگان
چکیده
This paper presents a compiler that translates Scheme code into the Java language. The programming language Scheme is known to be highly expressive and safe. By translating Scheme into Java, one can benefit from such features of Scheme as well as the portability of Java. Our compiler implements dynamic type checking in Scheme via down-casting in Java by mapping each Scheme value to a Java Object. However, naively doing so requires dynamic class checking in Java for every primitive operation in Scheme and thereby incurs much overhead. We reduce this overhead of runtime type checking by exploiting partial static type information obtained through soft typing. This method achieves about 200–700% speedup in micro benchmarks and 67% for a ray tracing program. Thus, our compiler combines the expressiveness and safety of Scheme with the portability of Java without much loss of efficiency.
منابع مشابه
بهبود و توسعه یک سیستم مترجمیار انگلیسی به فارسی
In recent years, significant improvements have been achieved in statistical machine translation (SMT), but still even the best machine translation technology is far from replacing or even competing with human translators. Another way to increase the productivity of the translation process is computer-assisted translation (CAT) system. In a CAT system, the human translator begins to type the tra...
متن کاملAn ECC-Based Mutual Authentication Scheme with One Time Signature (OTS) in Advanced Metering Infrastructure
Advanced metering infrastructure (AMI) is a key part of the smart grid; thus, one of the most important concerns is to offer a secure mutual authentication. This study focuses on communication between a smart meter and a server on the utility side. Hence, a mutual authentication mechanism in AMI is presented based on the elliptic curve cryptography (ECC) and one time signature (OTS) consists o...
متن کاملA Translator of Actor Prolog to Java
Actor Prolog is a concurrent object-oriented logic language developed in [1]. We demonstrate a state-of-the-art translator of Actor Prolog to Java developed in the framework of the Intelligent Visual Surveillance Logic Programming project [2]. The translator implements a set of high-level and low-level code optimization methods and generates a kind of the idiomatic (i.e., well-readable) source ...
متن کاملTowards Verification of MPJ-based Java Programs
A proof-of-concept Java/MPJ to Promela translator is presented as a step towards verification of safety properties of parallel Java programs using the MPJ library. The translator leverages the Soot library to achieve a threestep method for of the Java to Promela.
متن کاملProlog Cafe : A Prolog to Java Translator System
We present the Prolog Cafe system that translates Prolog into Java via the WAM. Prolog Cafe provides multi-threaded Prolog engines. A Prolog Cafe thread seem to be conceptually an independent Prolog evaluator and communicates with each other through shared Java objects. Prolog Cafe also has the advantages of portability, extensibility, smooth interoperation with Java, and modularity. In perform...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2007